<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>
            X-admin v1.0
        </title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <link rel="stylesheet" href="/P201606/bbs/Public/Admin/css/x-admin.css" media="all">
    </head>
    <body>
        <p>这个是link的模板</p>
        <button id="box">点我操作父亲</button>
        <script src="/P201606/bbs/Public/Admin/lib/layui/layui.js" charset="utf-8"></script>
        <script src="/P201606/bbs/Public/Admin/js/x-layui.js" charset="utf-8"></script>
        <script>
            layui.use(['element','layer','form'], function(){
                $ = layui.jquery;//jquery
              lement = layui.element();//面包导航
              layer = layui.layer;//弹出层
              form = layui.form()
            
              $('#box').click(function(event) {

                frames  = parent.document.getElementsByTagName("iframe");

                for(i=0;i<frames.length;i++){ //遍历，匹配时弹出id
                  if(frames[i].contentWindow == window){
                     id=i;
                  }
                }
                parent.element.tabDelete('x-tab',id);
                // alert(parent.getFrameId(this));
                // obj = window.parent.document.getElementsByClassName('logo');
                // console.log(obj);
                // obj[0].style.color="red";

                
                 // parent.location.replace('http://www.baidu.com')
              });
              
             //监听提交
              form.on('submit(*)', function(data){
                console.log(data);
                //发异步，把数据提交给php
                layer.alert("保存成功", {icon: 6});
                return false;
              });

              })
            </script>
            <script>
        var _hmt = _hmt || [];
        (function() {
          var hm = document.createElement("script");
          hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
          var s = document.getElementsByTagName("script")[0]; 
          s.parentNode.insertBefore(hm, s);
        })();
        </script>
    </body>
</html>